3.47 \(\int \frac{\tan (c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=37 \[ \frac{1}{2 d (a \sin (c+d x)+a)}+\frac{\tanh ^{-1}(\sin (c+d x))}{2 a d} \]

[Out]

ArcTanh[Sin[c + d*x]]/(2*a*d) + 1/(2*d*(a + a*Sin[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.067309, antiderivative size = 58, normalized size of antiderivative = 1.57, number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {2706, 2606, 30, 2611, 3770} \[ \frac{\sec ^2(c+d x)}{2 a d}+\frac{\tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac{\tan (c+d x) \sec (c+d x)}{2 a d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

ArcTanh[Sin[c + d*x]]/(2*a*d) + Sec[c + d*x]^2/(2*a*d) - (Sec[c + d*x]*Tan[c + d*x])/(2*a*d)

Rule 2706

Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/a, Int[S
ec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x] - Dist[1/(b*g), Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /;
FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\tan (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int \sec ^2(c+d x) \tan (c+d x) \, dx}{a}-\frac{\int \sec (c+d x) \tan ^2(c+d x) \, dx}{a}\\ &=-\frac{\sec (c+d x) \tan (c+d x)}{2 a d}+\frac{\int \sec (c+d x) \, dx}{2 a}+\frac{\operatorname{Subst}(\int x \, dx,x,\sec (c+d x))}{a d}\\ &=\frac{\tanh ^{-1}(\sin (c+d x))}{2 a d}+\frac{\sec ^2(c+d x)}{2 a d}-\frac{\sec (c+d x) \tan (c+d x)}{2 a d}\\ \end{align*}

Mathematica [A]  time = 0.038978, size = 28, normalized size = 0.76 \[ \frac{\frac{1}{\sin (c+d x)+1}+\tanh ^{-1}(\sin (c+d x))}{2 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

(ArcTanh[Sin[c + d*x]] + (1 + Sin[c + d*x])^(-1))/(2*a*d)

________________________________________________________________________________________

Maple [A]  time = 0.058, size = 54, normalized size = 1.5 \begin{align*} -{\frac{\ln \left ( \sin \left ( dx+c \right ) -1 \right ) }{4\,da}}+{\frac{1}{2\,da \left ( 1+\sin \left ( dx+c \right ) \right ) }}+{\frac{\ln \left ( 1+\sin \left ( dx+c \right ) \right ) }{4\,da}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

-1/4/a/d*ln(sin(d*x+c)-1)+1/2/a/d/(1+sin(d*x+c))+1/4*ln(1+sin(d*x+c))/a/d

________________________________________________________________________________________

Maxima [A]  time = 1.08759, size = 63, normalized size = 1.7 \begin{align*} \frac{\frac{\log \left (\sin \left (d x + c\right ) + 1\right )}{a} - \frac{\log \left (\sin \left (d x + c\right ) - 1\right )}{a} + \frac{2}{a \sin \left (d x + c\right ) + a}}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(log(sin(d*x + c) + 1)/a - log(sin(d*x + c) - 1)/a + 2/(a*sin(d*x + c) + a))/d

________________________________________________________________________________________

Fricas [A]  time = 1.63615, size = 163, normalized size = 4.41 \begin{align*} \frac{{\left (\sin \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (\sin \left (d x + c\right ) + 1\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2}{4 \,{\left (a d \sin \left (d x + c\right ) + a d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*((sin(d*x + c) + 1)*log(sin(d*x + c) + 1) - (sin(d*x + c) + 1)*log(-sin(d*x + c) + 1) + 2)/(a*d*sin(d*x +
c) + a*d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan{\left (c + d x \right )}}{\sin{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

Integral(tan(c + d*x)/(sin(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.34095, size = 78, normalized size = 2.11 \begin{align*} \frac{\frac{\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} - \frac{\log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a} - \frac{\sin \left (d x + c\right ) - 1}{a{\left (\sin \left (d x + c\right ) + 1\right )}}}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/4*(log(abs(sin(d*x + c) + 1))/a - log(abs(sin(d*x + c) - 1))/a - (sin(d*x + c) - 1)/(a*(sin(d*x + c) + 1)))/
d